<%@page import="com.gsdxsys.entity.Admin"%>
<%@page import="com.gsdxsys.service.impl.AdminServiceImpl"%>
<%@page import="com.gsdxsys.service.AdminService"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
	String uid=request.getParameter("username");
	String pwd=request.getParameter("password");
	String realname=request.getParameter("realname");
	AdminService service = new AdminServiceImpl(); 
	Admin admin = new Admin();
	admin.setUsername(uid);
	admin.setPassword(pwd);
	admin.setRealname(realname);
	int result = service.reg(admin);
	if(result>0) {
		out.print("Success");
	} else if(result==-1){
		out.print("账号已经存在不能注册");
	}else{
		out.print("Failed");
	}
%>
</body>
</html>